<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/12/24
 * Time: 15:54
 */

class Imei extends CI_Controller{
    function __construct()
    {
        parent::__construct();
        $this->load->model('imei_model');
    }
    public function index()
    {
        $gp=gp();
        if($gp['imei1'] || $gp['imei2']){
            $data = $this->imei_model->selectimei($gp['imei1'],$gp['imei2']);
            if ($data) {
                echo json_encode($data);
            } else {
                echo json_encode(array('error message' => 'data is null!'));
            }
        }else{
            echo json_encode(array('error message' => 'imei1 or imei2 Parameter must have one The assigned value'));
        }
    }
}